//############################################################################
//## WiiDS Emulator (DeSmuME Port)
//##--------------------------------------------------------------------------
//## input.h
//## - Wii Controller Setup
//############################################################################

#ifndef _INPUT_H_
#define _INPUT_H_

#include <gccore.h>
#include <wiiuse/wpad.h>

#define PI 					3.14159265f
#define PADCAL				50
#define MAXJP 				10 // Max Buttons

#define NDS_BUTTON_A		1
#define NDS_BUTTON_B		2
#define NDS_BUTTON_X		4
#define NDS_BUTTON_Y		8
#define NDS_UP				16
#define NDS_RIGHT			32
#define NDS_DOWN			64
#define NDS_LEFT			128
#define NDS_TRIGGER_L		256
#define NDS_TRIGGER_R		512
#define NDS_START			1024
#define NDS_SELECT			2048
#define NDS_TAP				4096

extern int rumbleRequest[4];
extern u32 btnmap[5][13];

void ResetControls(int wc = -1);
void ShutoffRumble();
void DoRumble(int i);
void systemGameRumble(int RumbleForFrames);
void systemGameRumbleOnlyFor(int OnlyRumbleForFrames);
void updateRumbleFrame();
u32 GetJoy(int which);
bool MenuRequested();
void SetupPads();
void UpdatePads();

#endif
